﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Swashbuckle.AspNetCore.Annotations;

namespace Model
{
    /// <summary>
    /// 统一
    /// </summary>
    public class SchoolID : ID, ISchool
    {
        /// <summary>
        /// 所属学校id，系统自动赋值
        /// </summary>
        [SwaggerSchema(ReadOnly = true)]
        public int? SchoolId { get; set; }
        /// <summary>
        ///  所属学校对象，客户端做增加修改时不需要给此属性赋值（只需要传递修改schoolId属性值）
        /// </summary>
        [ForeignKey("SchoolId")]
        [Display(Name = "学校")]
        [SwaggerSchema(ReadOnly = true)]
        public virtual School School { get; set; }
    }
}
